class Solution(object):
    def maximumPopulation(self, logs):
        out = [0] * 101
        for b, d in logs:
            out[b - 1950] += 1
            out[d - 1950] -= 1
        t = 0
        max_len = 0
        for index, c in enumerate(out):
            t += c
            if t > max_len:
                d = index
                max_len = t
        return d + 1950
